package com.patterns.factory.method;

/**
 * 工厂方法模式实现类
 * @author fwj
 * @date 2020/12/8 17:39
 **/
public class MethodDemo {

    public static void main(String[] args) {
        ShapeFactory shapeFactory;

        shapeFactory = new CircleFactory();
        shapeFactory.createShape();

        shapeFactory = new RectangleFactory();
        shapeFactory.createShape();

        shapeFactory = new SquareFactory();
        shapeFactory.createShape();
    }

}
